import { Router } from 'express';
import service from '../service/super';
import { AuthError } from '../utils/classModal';
const router = Router();

router.use(({ originalUrl: api }, { locals: { level } }, next) => {
	if (![999].includes(level)) throw new AuthError();
	next();
});
router.put('/ban/:id/:dis', service.banuser);

module.exports = router;
